package org.hibernate.validator.xml;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(
        name = "constraint-definitionType",
        propOrder = {"validatedBy"}
)
public class ConstraintDefinitionType {
    @XmlElement(
            name = "validated-by",
            required = true
    )
    protected ValidatedByType validatedBy;
    @XmlAttribute(
            required = true
    )
    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
    protected String annotation;

    public ConstraintDefinitionType() {
    }

    public ValidatedByType getValidatedBy() {
        return this.validatedBy;
    }

    public void setValidatedBy(ValidatedByType value) {
        this.validatedBy = value;
    }

    public String getAnnotation() {
        return this.annotation;
    }

    public void setAnnotation(String value) {
        this.annotation = value;
    }
}